<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>团课列表</title>
	<meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0.maximum-scale=1.0,user-scalable=no" name="viewport">
	<link rel="stylesheet" href="css/weui.min.css">
	<link rel="stylesheet" href="css/jquery-weui.css">
	<link rel="stylesheet" href="css/swiper.min.css">
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/bosscoach.css">
	<link rel="stylesheet" href="css/flexible.css">
	<link rel="stylesheet" href="css/vant.css">
	<script src="js/vue/vue.js"></script>
	<script src="js/vue/axios.js"></script>
	<script src="js/vue/vant.js"></script>
	<script src="js/jquery.md5.js"></script>
	<script src="js/vue/qs.js"></script>
	<script src="js/glabe.js"></script>
	<script src="js/jquery-3.3.1.min.js"></script>
	<script src="js/fontsize.js"></script>
    <script src="js/flexible.js"></script>
    <style>
        .classList{
            width: 100%;
            padding: 0 0.5rem;
            box-sizing: border-box;
        }
        .classList>div{
            margin-top: 0.5rem;
            height: 5rem;
        }
        .classList>div:nth-child(1){
            margin-top: 0;
        }
        .classList_item{
            width: 100%;
            height: 100%;
            border-radius: 0.2rem;
            box-shadow:0rem 0.1rem 0.2rem rgba(0, 0, 0, 0.05);
            padding: 0 2rem 0 1rem;
            box-sizing: border-box;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .classList_item_title{
            font-size: 0.8rem;
            color: #000;
            font-weight: 600;
        }
        .classList_item_con{
            color: #999;
            font-size: 0.68rem;
        }
        .classList_num{
            color: #2377b3;
            font-size: 0.65rem;
        }
        .addClass_1{
            width: 80%;
            background: #0E9CFA;
            color: #fff;
            height: 1.8rem;
            text-align: center;
            line-height: 1.8rem;
            font-size: 0.8rem;
            margin: 1rem auto;
            border-radius: 0.1rem;
        }
    </style>
</head>
<body>
    <div id="app"> 
        <div class="classList">
            <div class="classList_item" v-for="item in classList" @click="modifyGroup(item.id)">
                <div>
                    <p class="classList_item_title">{{item.Title}}</p>
                    <p class="classList_item_con">
                        <span>{{item.Sdate}}~{{item.Edate}}</span>
                        <span>|</span>
                        <span>{{item.Sname}}</span>
                    </p>
                </div>
                <div class="classList_num">
                    {{item.Min}}/{{item.Max}}
                </div>
            </div>
        </div>
        <div class="addClass_1" @click="addClass()">
            添加排课
        </div>
    </div>
	<div class="technology">由馆家提供技术支持</div>
	<script>
        var app = new Vue({
            el: '#app',
            data: {
                //团课列表
                classList:null
            },
            created() {
                //获取团课数据
                axios.get('/mobileapi/boss/curriculum_plan.php?act=CurriculumPlan').then(res=>{
                    if(res.data.code == 200){
                        console.log(res.data.data);
                        this.classList = res.data.data;
                    }else{
                        vant.Toast(res.data.msg);
                    }
                }).catch(err=>{
                    vant.Toast('请求发送失败，请重试');
                })
            },
            methods: {
                //添加排课按钮
                addClass(){
                    location.href = "privateTutoring.html"
                },
                //修改团课排课
                modifyGroup(id){
                    location.href = "privateTutoring.html?id="+id;
                }
            }
        })
	</script>
</body>
</html>